<template>
	<div>
		<!-- 普通节点 -->
		<div :class="'flow-node ' + config.type" 
			@click="handleAllClick"
			v-if="config.type == 'start' || config.type == 'approval' || config.type == 'end' || config.type == 'cc' || config.type == 'handle' || config.type == 'condition'">
			<div class="bottom-v-line" v-if="config.type != 'end'"></div>
			<!-- 新增节点按钮 -->
			<div class="add-node-btn" v-if="config.type != 'end'">
				<div class="add-btn" @click="openAddMenu">+</div>
				<FlowNodeAddMenu 
					@addFlowNode="handleAddFlowNode($event, config)"
					v-show="$store.state.flowNodeAddMenu == config" />
			</div>
			<div class="bottom-v-arrow" v-if="config.type != 'end'"></div>
			<div class="flow-node-container " 
				@mouseover="closeBtnDisplay = true" 
				@mouseout="closeBtnDisplay = false"
				@click="openAttributePanel">
				<div class="node-title" 
					:class="{ 'disabled': config.isDefault }">
					<div class="label">{{ config.approvalAttrubuteData.approvalName }}</div>
					<!-- 删除按钮 -->
					<div class="close-btn"
						v-if="config.type !== 'start' && config.type !== 'end' && (config.isDefault == null || config.isDefault == false)"
						@click="remove" v-show="closeBtnDisplay">×</div>
				</div>
				<!-- <div class="node-content">
					{{ config.approvalAttrubuteData.placeholder }}
				</div> -->

				<div class="node-content">
					<span
						v-if="config.approvalAttrubuteData.approvalTargets == null || config.approvalAttrubuteData.approvalTargets.length == 0">
						{{config.approvalAttrubuteData.placeholder }}
					</span>
					<div v-for="approvalTarget in config.approvalAttrubuteData.approvalTargets"
						v-if="config.approvalAttrubuteData.approvalTargets.length > 0">
						{{ approvalTarget.target }}:
						<span v-for="user in approvalTarget.users">{{ user }}</span>
					</div>
				</div>
			</div>
		</div>

		<!-- 条件分支 -->
		<div class="flow-node route" v-if="config.type == 'branch'">
			<div class="top-h-line"></div>
			<div class="add-branch">
				<div class="add-branch-inner" @click="addBranch(config.branchs)">
					<span>＋ 添加条件分支</span>
				</div>
			</div>
			<div class="branchs">
				<div class="flow-node branch" v-for="branch in config.branchs">
					<div class="top-line-mask"></div>
					<div class="top-v-line"></div>
					<div class="bottom-v-arrow"></div>
					<div class="nodes">
						<FlowNode 
							v-for="nodeConfig in branch" 
							@removeBranch="handleRemoveBranch" 
							@editFlowNodeAttribute="handleEditFlowNodeAttribute"
							:config="nodeConfig"
							:nodes="branch" 
							:branchs="config.branchs" />
					</div>
					<div class="bottom-v-line"></div>
					<div class="bottom-line-mask"></div>
				</div>
			</div>
			<div class="bottom-h-line"></div>
			<div class="bottom-v-line"></div>
			<div class="add-node-btn">
				<div class="add-btn" @click="openAddMenu">+</div>
				<FlowNodeAddMenu 
					@addFlowNode="handleAddFlowNode($event, config)"
					v-show="$store.state.flowNodeAddMenu == config" />
			</div>
			<div class="bottom-v-arrow"></div>
		</div>
	</div>
</template>
<script>
import FlowNodeAddMenu from './FlowNodeAddMenu.vue'
import { getTemplate } from './FlowNodeConfigTemplateFactory.js'
export default {
	name: "FlowNode",
	props: {
		config: {
			type: Object,
			default: () => {
				return {

				}
			}
		},
		nodes: {
			type: Array,
			default: () => {
				return [];
			}
		},
		branchs: {
			type: Array,
			default: () => {
				return [];
			}
		}
	},
	data() {
		return {
			addNodeBtnDisplay: false,
			closeBtnDisplay: false
		}
	},
	components: {
		FlowNodeAddMenu
	},
	methods: {
		addBranch(branchs) {
			branchs.push(getTemplate("branch"))
		},
		handleAddFlowNode(type, config) {
			let nodeConf = getTemplate(type);
			console.log(type, JSON.stringify(nodeConf))
			this.nodes.splice(this.nodes.indexOf(config) + 1, 0, nodeConf)
			this.$store.commit('setFlowNodeAddMenu', null);
		},
		openAddMenu(e) {
			e.stopPropagation()
			this.$store.commit('setFlowNodeAddMenu', this.config);
		},
		handleAllClick(e) {
			e.preventDefault();
			this.$store.commit('setFlowNodeAddMenu', null);
		},
		handleNodeHover() {
			console.log("鼠标悬浮")
			this.closeBtnDisplay = true;
		},
		remove(e) {
			e.stopPropagation()
			if (this.config.type === 'condition') {
				this.$emit('removeBranch', this.nodes, this.branchs);
			} else {
				let index = this.nodes.indexOf(this.config);
				this.nodes.splice(index, 1)
			}
		},
		handleRemoveBranch(nodes, branchs) {
			console.log("nodes", nodes)
			console.log("branchs", branchs)
			console.log("config", this.config)
			if (branchs.length == 2) {
				//删除整个branch节点
				this.nodes.splice(this.nodes.indexOf(this.config), 1)
			} else {
				branchs.splice(branchs.indexOf(nodes), 1);
			}
		},
		openAttributePanel(e){
			e.stopPropagation();
			console.log(this.config)
			this.$emit('editFlowNodeAttribute',this.config.approvalAttrubuteData)
		},
		handleEditFlowNodeAttribute(approvalConfig){
			this.$emit('editFlowNodeAttribute',approvalConfig)
		}
	}
}
</script>
<style scoped>
@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes slide-in {
	from {
		right: 0px;
		/* 动画开始的位置 */
		opacity: 0;
		/* 开始时不可见 */
	}

	to {
		right: 400px;
		/* 动画结束位置 */
		opacity: 1;
		/* 完全可见 */
	}
}

div {
	margin: 0;
	padding: 0;
}

* {
	box-sizing: border-box;
}

label {
	cursor: pointer;
}

#flow-container {
	/* width: 900px; */
	margin: 0 auto;
	display: inline-flex;
	flex-direction: column;

}

.branch .nodes {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-wrap: nowrap;
}

.flow-node .approval,
.flow-node .cc,
.flow-node .handle,
.flow-node .start,
.flow-node .end,
.flow-node .condition {
	width: 200px;
	height: 150px;
	position: relative;

}

.flow-node .flow-node-container {
	position: absolute;
	z-index: 1;
	top: 0;
	left: 0;
	width: 200px;
	max-height: 92px;
	cursor: pointer;
	background: #a9b4cd;
	border-radius: 8px;
	overflow: hidden;
}


.flow-node .flow-node-container .node-title {
	display: flex;
	justify-content: space-between;
	height: 28px;
	font-size: 12px;
	padding: 2px 4px;
	color: #fff;
}

.flow-node .flow-node-container .disabled {
	color: #8f959e !important;
}

.flow-node .flow-node-container .node-title>.label {
	padding: 0 4px;
	margin: 2px 4px;
	border-radius: 6px;
	line-height: 20px;
}

.flow-node .flow-node-container .node-title>.label:hover {
	background-color: rgba(31, 35, 41, .1);
}

.flow-node .flow-node-container .node-title .close-btn {
	font-size: 18px;
	line-height: 16px;
	padding-right: 4px;
}

.flow-node .flow-node-container .node-title .close-btn:hover {
	font-size: 20px;
}

.flow-node .approval .flow-node-container {
	background-color: #f80;
	
}
.flow-node .approval .flow-node-container:hover{
	box-shadow: 0 0 3px 0 #ff5b4c;
}

.flow-node .cc .flow-node-container {
	background-color: #3370ff;
}

.flow-node .handle .flow-node-container {
	background-color: #935af6;
	box-shadow: 0 0 3px 0 #935af6;
}

.flow-node.condition .flow-node-container {
	background-color: #fff;
}

.flow-node.condition .flow-node-container .node-title {
	color: #2eb795;
	border-bottom: 1px solid #f6f6f7;
}

.flow-node .flow-node-container .node-content {
	background-color: #fff;
	padding: 7px 6px 7px 7px;
	margin: 0 4px 4px;
	border-radius: 4px;
	font-size: 14px;
	color: #3e4759;
}

.flow-node .approval>.bottom-v-line,
.flow-node .cc>.bottom-v-line,
.flow-node .handle>.bottom-v-line,
.flow-node .start>.bottom-v-line,
.flow-node .condition>.bottom-v-line {
	position: absolute;
	background-color: #c2c5cc;
	width: 1px;
	height: 150px;
	bottom: 1px;
	left: 99.5px;
	box-sizing: border-box;
	z-index: 1;
}

.add-node-btn {
	position: absolute;
	box-sizing: initial;
	left: 85px;
	height: 28px;
	width: 28px;
	bottom: 31px;
	z-index: 2;
}

.add-node-btn .add-btn {
	height: 28px;
	width: 28px;
	color: #37f;
	text-align: center;
	border-radius: 50%;
	border: 1px solid transparent;
	font-size: 24px;
	line-height: 24px;
	background-color: #fff;
	filter: drop-shadow(0 4px 8px rgba(31, 35, 41, .1));
	cursor: pointer;
}

.add-btn:hover {
	border-color: #3370ff;
	background-color: #fff;
	box-shadow: 0 6px 24px rgba(51, 112, 255, .24);
}



.bottom-v-arrow {
	width: 10px;
	height: 10px;
	left: calc(50% - 5px);
	transform: matrix(1, 0, 0, -1, 0, 0);
	border-bottom: 10px solid #c2c5cc;
	border-right: 5px solid transparent;
	border-left: 5px solid transparent;
	background-color: #f0f0f2;
	box-sizing: border-box;
}

.flow-node .approval>.bottom-v-arrow,
.flow-node .cc>.bottom-v-arrow,
.flow-node .handle>.bottom-v-arrow,
.flow-node .start>.bottom-v-arrow,
.flow-node .route>.bottom-v-arrow,
.flow-node .condition>.bottom-v-arrow {
	position: absolute;
	bottom: 0px;
}

.branch>.bottom-v-arrow {

	bottom: 0px;

}

/* route */
.route {
	display: flex;
	flex-direction: column;
	position: relative;
	/* border: 1px dotted red; */
}

.route div {
	box-sizing: border-box;
}

.route .top-h-line {
	transform: translateY(-11px);
	height: 1px;
	background-color: #c2c5cc;
	margin-top: 14.5px;
	margin-bottom: -15.5px;
	width: calc(100% - 200px);
	margin-left: 100px;
}

.route .add-branch {
	top: -11px;
	position: relative;
	height: 30px;
	margin-bottom: 16px;
	border-radius: 15px;
	border: 1px solid transparent;
	align-self: center;
	color: #37f;
	font-size: 12px;
	cursor: pointer;
	z-index: 1;
	box-shadow: 0 4px 8px rgba(31, 35, 41, .1);
}

.route .add-branch:hover {
	border: 1px solid #37f;
	box-shadow: 0 6px 24px rgba(51, 112, 255, .24);
}

.route .add-branch .add-branch-inner {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	padding: 0 12px;
	border: none;
	border-radius: 14px;
	background-color: #fff;
}


.branchs {
	display: flex;
	justify-content: center;
	align-content: flex-end;
	flex-direction: row;

}

.branchs .branch {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	margin-right: 40px;
	min-height: 100%;
}

.branchs .branch .top-v-line {
	height: 42.5px;
	top: -41.5px;
	display: block;
	position: absolute;
	width: 1px;
	background-color: #c2c5cc;
}

.branchs .branch:first-child {
	margin-left: 0px;
}

.branchs .branch:first-child>.top-line-mask {
	top: -44px;
	display: block;
	position: absolute;
	width: 50%;
	height: 4px;
	background-color: #f0f0f2;
	left: 0px;
}

.branchs .branch:last-child {
	margin-right: 0px;
}

.branchs .branch:last-child>.top-line-mask {
	top: -44px;
	display: block;
	position: absolute;
	width: 50%;
	height: 4px;
	background-color: #f0f0f2;
	right: 0px;
}

.branchs .branch:first-child .top-v-line {
	left: calc(50% - .5px);
}

.route>.bottom-h-line {
	height: 1px;
	background-color: #c2c5cc;
	width: calc(100% - 200px);
	margin-left: 100px;
}

.route .branch>.bottom-v-line {
	display: block;
	width: 1px;
	background-color: #c2c5cc;
	flex-grow: 1;
}

.flow-node.route>.bottom-v-line {
	height: 100px;
	width: 1px;
	background-color: #c2c5cc;
	align-self: center;
}

.flow-node.route>.add-node-btn {
	bottom: 50px;
	left: 50%;
	box-sizing: initial;
	transform: translateY(50%) translateX(-50%);
}

.flow-node.route>.branchs>.flow-node.branch>.nodes>.flow-node:last-child>.bottom-v-arrow {
	display: none;
}

.flow-node.route .flow-node.branch:last-child>.bottom-line-mask {
	bottom: -4px;
	right: 0;
	display: block;
	position: absolute;
	width: 50%;
	height: 4px;
	background-color: #f0f0f2;
}

.flow-node.route .flow-node.branch:first-child>.bottom-line-mask {
	bottom: -4px;
	left: 0;
	display: block;
	position: absolute;
	width: 50%;
	height: 4px;
	background-color: #f0f0f2;
}


/* 审批属性设置 */
.approval-attributes {
	transition: transform .5s, -webkit-transform .5s;
}

.mask {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100;
	background-color: rgba(0, 0, 0, .3);
	animation: fadeIn 0.1s ease-in-out forwards;
}

.approval-editor-drawer {
	position: fixed;
	top: 0;
	right: 0px;
	bottom: 0;
	width: 532px;
	box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .06);
	background-color: #fff;
	/* transition: transform .5s, -webkit-transform .5s; */
	z-index: 1000;
	font-size: 14px;
	animation: fadeIn 0.45s ease-in-out forwards;
}

.approval-editor-content {
	height: 100%;
	overflow: auto;
}

.approval-editor-form {
	margin-bottom: 20px;
	padding: 0 16px;
}


.approval-editor-name-wrapper {
	display: flex;
	align-items: baseline;
	min-height: 64px;
	padding: 18px 16px;
	border-bottom: 1px solid #e4e5e7;
}

.approval-editor-name-wrapper .approval-editor-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 18px;
	font-weight: 600;
	color: #171e31;
	cursor: pointer;
}

/* 审批节点名称 */
.approval-name-editor-input {
	border: 1px solid #000000;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 18px;
	font-weight: 600;
	color: #171e31;
	outline: none;
}

.readonly {
	border: 0px;
}

.item-wrapper {
	margin-top: 16px;
}

.approval-type-wrapper .item-key-wrapper {
	display: flex;
	justify-content: space-between;
}

.item-key {
	font-weight: 600;
	color: #1f2329;
	margin-top: 10px;
}

.item-content {
	margin-top: 8px;
}

.item-content>label>span {
	box-sizing: border-box;
	color: #1f2329;
	z-index: 1;
	margin-left: 0px;
	margin-right: 18px;
	overflow-wrap: break-word;
}

.approval-editor-tab-wrapper {
	margin-top: 24px;

}

.approval-editor-tab-wrapper .approval-function-btn-group {
	display: flex;
	flex-wrap: wrap;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	color: #1f2329;
	font-size: 14px;
	font-variant: tabular-nums;
	list-style: none;
	font-feature-settings: "tnum", "tnum";
	line-height: unset;
}

.approval-editor-tab-wrapper .approval-function-btn-group .btn {
	flex: 1 1;
	display: flex;
	justify-content: center;
	align-items: center;
	height: auto;
	text-align: center;
	line-height: 20px;
	padding-top: 5px;
	padding-bottom: 5px;
	border: 1px solid #d9d9d9;
	border-top: 1.02px solid #d9d9d9;
	cursor: pointer;
}

.role-info {
	margin-top: 8px;
	color: #8f959e;
}

a {
	color: #3370ff;
	text-decoration: none;
	background-color: initial;
	outline: none;
	cursor: pointer;
	-webkit-transition: color .3s;
	transition: color .3s;
	-webkit-text-decoration-skip: objects;
}

a:hover {
	color: #5c92ff;
}

.approval-editor-tab-wrapper .approval-function-btn-group .btn:hover {
	color: #3370ff;
}

.approval-editor-tab-wrapper .approval-function-btn-group .btn:first-child {
	border-radius: 6px 0 0 6px;
	border-right: 0px;
}

.approval-editor-tab-wrapper .approval-function-btn-group .btn:last-child {
	border-radius: 0 6px 6px 0;
	border-left: 0px;
}

.approval-editor-tab-wrapper .approval-function-btn-group .btn.active {
	color: #fff;
	background: #37f;
	border-color: #37f;
}

.approval-function-setting-content {
	margin-top: 8px;
	border: 1px solid #e4e5e7;
	border-radius: 6px;
	overflow: hidden;
	animation: fadeIn 0.3s ease-in-out forwards;
}

.approval-function-setting-content .approver-setting .header {
	padding: 0 16px;
	background: #f5f6f7;
	height: 36px;
	line-height: 36px;
	display: flex;
	font-size: 14px;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
}

.approval-function-setting-content .approver-setting .header .close-btn {
	font-size: 18px;
	cursor: pointer;
	color: 646a73;
}

.approval-function-setting-content .approver-setting .header .close-btn:hover {
	color: #3370ff;
}

.approval-function-setting-content .approver-setting .options {
	display: flex;
	flex-wrap: wrap;
	padding: 10px 16px;
	font-size: 14px;
}

.approval-function-setting-content .approver-setting .options>div {
	flex-basis: 33.3%;
	margin: 6px 0;
	/* font-size: 14px; */
}

.approval-function-setting-content .approver-setting .options>div span {
	margin-left: 6px;
}

.approval-function-setting-content .approver-setting .sub-content {
	padding: 0 16px 16px;
}

.approval-function-setting-content .approver-setting .sub-content .sub-content-top-line {
	border-top: 1px solid #dee0e3;
	margin-top: 6px;
	margin-bottom: 16px;
}

.approval-function-setting-content .approver-setting .sub-content p {
	margin-top: 6px;
	font-weight: 600;
}

.light-text {
	color: #8f959e;
	font-weight: 400;
}

.add-approver-wrapper {
	display: flex;
	flex-wrap: wrap;
}

.add-approver-wrapper .add-approver-btn {
	display: flex;
	align-items: center;
	width: 56px;
	height: 32px;
	border-radius: 100px;
	border: 1px solid #3370ff;
	justify-content: center;
	margin-right: 8px;
	margin-top: 8px;
	cursor: pointer;
	color: #3370ff;
}

.add-approver-wrapper .add-approver-item {
	display: flex;
	align-items: center;
	min-width: 70px;
	max-width: 50%;
	height: 32px;
	background: #eff0f1;
	border-radius: 16px;
	padding: 0 4px;
	margin-right: 8px;
	margin-top: 8px;
}

.add-approver-wrapper .add-approver-item img {
	width: 24px;
	height: 24px;
	border-radius: 12px;
}

.add-approver-wrapper .add-approver-item div {
	padding: 0;
	margin: 0 4px;
	min-width: 28px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.add-approver-wrapper .add-approver-item .close-btn {
	color: #646a73;
	font-size: 24px;
	line-height: 22px;
	text-align: right;
	cursor: pointer;
}

.add-approver-wrapper .add-approver-item .close-btn:hover {
	color: #3370ff;
}

.approver-self {
	display: flex;
	flex-wrap: wrap;

}

.approver-self div {
	flex-basis: 48%;
	margin: 6px 0;
}

.add-operator {
	display: inline-block;
	line-height: 24px;
	color: #3370ff;
	cursor: pointer;
	user-select: none;
	/* padding: 2px 4px; */
	border-radius: 6px;
	/* margin-left: 5px; */
	padding: 2px 4px;
	margin-top: 6px;
	font-size: 14px;

}

.add-operator:hover {
	background-color: rgba(51, 112, 255, .1);
}

html {
	-antd-wave-shadow-color: #3370ff;
}

.more-info {
	font-size: 14px;
	color: #666;
}

.goto-other-setting {
	color: #3370ff;
	cursor: pointer;
}

.approver-tip-question-icon {
	margin-left: 5px;
	color: #8f959e;
}

.anticon {
	display: inline-block;
	font-style: normal;
	line-height: 0;
	text-align: center;
	text-transform: none;
	vertical-align: -.125em;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.approver-setting .sub-content .approver-user-selector .supervisor-select-tip {
	margin-top: 8px;
	font-size: 12px;
	color: #646a73;
}

/* 信息悬浮框 */
.anticon {
	position: relative;
}

.anticon .remark-info-panel {
	display: none;
	position: absolute;
	bottom: 30px;
	left: -150px;
	right: 20px;
	width: 474px;
	background-color: #FFFFFF;
	border: 1px solid #DEE0E3;
	border-radius: 8px;
	padding: 12px 16px;
	box-shadow: 0px 8px 24px 8px rgba(31, 35, 41, .04), 0px 6px 12px rgba(31, 35, 41, .04), 0px 4px 8px -8px rgba(31, 35, 41, .04);
	box-sizing: border-box;
}

.tip-content {
	font-size: 14px;
	color: #646a73;
	line-height: 22px;
	text-align: left;

}

.tip-content .main-title {
	color: #1f2329;
}

.approval-function-content-approver-set {
	display: block;
}

.approval-function-content-form-authority-set {
	display: none;
}

.approval-function-content-form-authority-set table {
	width: 100%;
	border: 1px solid #dee0e3;
	margin-top: 8px;
}

.approval-function-content-form-authority-set table thead {
	background-color: #fafafc;
}

.approval-function-content-form-authority-set table thead label {
	cursor: pointer;
}

.approval-function-content-form-authority-set table thead label span {
	display: inline-block;
	font-size: 15px;
	margin-left: 8px;
}

.approval-function-content-form-authority-set table td {
	/* height: 37px; */
	border-bottom: 1px solid #dee0e3;
	font-size: 13px;
	padding: 9px 0 9px 10px;
}

.approval-function-content-action-authority-set {
	display: none;
	margin-top: 8px;
	padding: 10px 0;
}

.approval-function-content-action-authority-set .action-content .action-content-item {
	height: 44px;
}

.ant-divider-horizontal {
	display: block;
	clear: both;
	width: 100%;
	min-width: 100%;
	height: 1px;
	margin: 24px 0;
}

.ant-divider,
.ant-divider-vertical {
	position: relative;
	top: -.06em;
	vertical-align: middle;
}

.ant-divider {
	box-sizing: border-box;
	color: #1f2329;
	font-size: 14px;
	font-variant: tabular-nums;
	line-height: 1.5;
	list-style: none;
	font-feature-settings: "tnum", "tnum";
	background: #e8e8e8;
}

.item-wrap {
	margin-bottom: 16px;
}

.approval-editor-footer-wrapper {
	position: absolute;
	bottom: 0;
	right: 0;
	left: 0;
	z-index: 1;
	height: 64px;
	border: 1px solid #ededf0;
	background-color: #fff;
	padding: 16px;
}

.fz-btn {
	height: 32px;
	line-height: 22px;
	padding: 4px 11px;
	font-size: 14px;
	border-radius: 6px;
	min-width: 80px;
	box-sizing: border-box;
	margin: 0;
	list-style: none;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	position: relative;
	white-space: nowrap;
	text-align: center;
	cursor: pointer;
	user-select: none;
	outline: none;
	border: 1px solid #fff;
	transition: color .1s ease-in, background-color .1s ease-in, border-color .1s ease-in, width .2s ease-in;
	touch-action: manipulation;
	text-decoration: none;
	color: #1f2329;
	background: #fff;
	border-color: #d0d3d6;
}

button,
select {
	text-transform: none;
	/* width: 100%; */
}

option {
	height: 32px;
}

button,
input {
	overflow: visible;
}

.primary {
	color: #fff;
	background: #3370ff;
	border-color: #3370ff;
}

.fz-btn:hover {
	color: #1f2329;
	background: #f2f3f5;
	border-color: #d0d3d6;
}

.fz-btn:active {
	color: #1f2329;
	background: #eff0f1;
	border-color: #d0d3d6;
}

.primary:hover {
	color: #fff;
	background: #4e83fd;
	border-color: #4e83fd;
}

.primary:active {
	color: #fff;
	background: #245bdb;
	border-color: #245bdb;
}

.approval-editor-footer-wrapper .btn-group {
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
}

.approval-editor-footer-wrapper .btn-group .cancel {
	margin-right: 12px;
}


.radio-line-group {
	width: 100%;
	display: flex;
	/* flex-direction: row-reverse; */
	justify-content: center;
	flex-wrap: wrap;
	padding-left: 13px;
	padding-bottom: 10px;
}

.radio-line-group>label {
	flex-grow: 1;
	width: 130px;
	padding-top: 8px;
	margin-bottom: 0;
}

.radio-line-group>label span {
	box-sizing: border-box;
	color: #1f2329;
	z-index: 1;
	margin-left: 4px;
	margin-right: 8px;
	overflow-wrap: break-word;
}


#superior-select,
#role-select,
#usergroup-select,
#selfselect-select {
	display: none;
}

#anticon {
	display: inline-block;
	height: 18px;
	width: 18px;
	line-height: 18px;
	border-radius: 50%;
	text-align: center !important;
	border: 1px solid #ccc;
	cursor: pointer;
}

.panel {
	margin-top: 8px;
	border: 1px solid #e4e5e7;
	border-radius: 6px;
	overflow: hidden;
	animation: fadeIn 0.3s ease-in-out forwards;
}

.panel .header {
	padding: 0 16px;
	background: #f5f6f7;
	height: 36px;
	line-height: 36px;
	display: flex;
	font-size: 14px;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
}

.panel .content {
	padding: 13px;
}

.display-block {
	width: 100% !important;
}

.user-group,
.role-user {
	/* display: none; */
}

/* 提交按钮 */
.submit-btn {
	position: fixed;
	top: 20px;
	right: 20px;
}
</style>./FlowNodeConfigTemplateFactory.js/index.js